<template>
  <el-container>
    <el-header>
      <div class="win-tools">
        <el-button type="danger" @click="ipcRenderer.send('close')">关闭</el-button>
        <el-button type="warning" @click="ipcRenderer.send('min')">最小化</el-button>
        <el-button type="success" @click="ipcRenderer.send('window-maximize')">最大化</el-button>
        <el-button @click="ipcRenderer.send('openDevTools')">控制台</el-button>
      </div>
    </el-header>
    <el-main>
      <el-row justify="center">
        <el-col :span="8">
          <emo-clipboard />
        </el-col>
        <el-col :span="8">
          <el-button type="primary" @click="showVisible1">人员选择</el-button>
          <el-button type="primary" @click="showVisible2">成员选择</el-button>
        </el-col>
      </el-row>
    </el-main>
    <user-selector v-model="visible1" />
    <member-selector v-model="visible2" />
  </el-container>
</template>

<script lang="ts" setup>
import { ref } from "vue";
const { ipcRenderer } = require("electron");
import { EmoClipboard, UserSelector, MemberSelector } from "@/components";

const visible1 = ref(false);
const visible2 = ref(false);

const showVisible1 = () => {
  visible1.value = true;
};

const showVisible2 = () => {
  visible2.value = true;
};
</script>

<style scoped></style>
